package com.scsj.supermarket.view.activity.withdrawmodel;

import android.os.Bundle;
import android.support.v7.widget.RecyclerView;

import com.alibaba.fastjson.JSONObject;
import com.scsj.supermarket.R;
import com.scsj.supermarket.base.GetTakeCashDetailsBase;
import com.scsj.supermarket.bean.GetTakeCashDetailsBean;
import com.scsj.supermarket.presenter.GetTakeCashDetailsPresenter;
import com.scsj.supermarket.view.activity.baseactivitymodel.BaseActivity;

import okhttp3.RequestBody;

/**
 * 余额提现进度
 */
public class WithDrawActivity extends BaseActivity implements GetTakeCashDetailsBase.IView {

    private RecyclerView rv;
    private GetTakeCashDetailsPresenter presenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_with_draw);
        initToolbar();
        setTitle("余额提现");
        hasBack(true);
        initView();
        initListener();
        initData();

        presenter = new GetTakeCashDetailsPresenter(this);
        if (getIntent().hasExtra("tackCasdId")) {
            String tackCasdId = getIntent().getStringExtra("tackCasdId");
            JSONObject object = new JSONObject();
            object.put("tackCasdId",tackCasdId);
            RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), object.toString());
            presenter.deliverData(body);
        }
    }

    @Override
    protected void createView(Bundle savedInstanceState) {

    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {

    }

    @Override
    public void showSuccessMsg(String s, GetTakeCashDetailsBean bean) {

    }

    @Override
    public void showErrorMsg(String s) {

    }
}
